import { request } from "../../request/index.js"
import regeneratorRuntime from "../../lib/runtime/runtime"

Page({
  data: {
    id: 1,
    head: 'https://i2.hdslb.com/bfs/face/cb048764be6e075d1a3e01bd8bdf99a653f3adfe.jpg@150w_150h.jpg',
    auther: '木上野狐',
    text: '虽然在赛后第一时间发布了变化图，但始终不敢做这局棋的复盘。\n不知不觉来到了两个月后。\n慢慢发觉：宝剑锋从磨砺出。\n人生不可能事事如意，挫折与失望，本就是棋与人生的一部分。\n希望柯洁早日拿到第九冠，重归王座！',
    zan: 0,
    liuyan: 0,
    time: '2021-2-2 22:42:42',
    img: [
      'https://i0.hdslb.com/bfs/album/9b321df73f2108d20dbde13504d5e311388206c6.jpg@518w.webp',
      'https://i2.hdslb.com/bfs/face/cb048764be6e075d1a3e01bd8bdf99a653f3adfe.jpg@150w_150h.jpg'
    ],
    reply2: [{
      id: 0,
      zan: 0,
      head: 'https://i2.hdslb.com/bfs/face/cb048764be6e075d1a3e01bd8bdf99a653f3adfe.jpg@150w_150h.jpg',
      target: '木上野狐',
      auther: '柳江南',
      text: 'WDNDNMD',
      img: 'https://i0.hdslb.com/bfs/album/9b321df73f2108d20dbde13504d5e311388206c6.jpg@518w.webp'
    }, {
      id: 1,
      zan: 0,
      head: 'https://i2.hdslb.com/bfs/face/cb048764be6e075d1a3e01bd8bdf99a653f3adfe.jpg@150w_150h.jpg',
      target: '木上野狐',
      auther: '柳江南',
      text: 'WDNMDWDNMDWDNMDWDNMDWDNMDWDNMDWDNMDWDNMDWDNMDWDNMDWDNMD',
      img: ''
    }, {
      id: 2,
      zan: 0,
      head: 'https://i2.hdslb.com/bfs/face/cb048764be6e075d1a3e01bd8bdf99a653f3adfe.jpg@150w_150h.jpg',
      target: '木上野狐',
      auther: 'aaa',
      text: 'WDNMDWDNMDWDNMDWDNMDWDNMDWDNMDWDNMDWDNMDWDNMDWDNMDWDNMD',
      img: ''
    }]
  },

  preview(e) {
    // urls 获取 park 里的所有图片url
    // current 获取当前点击图片url
    const current = e.currentTarget.dataset.url
    wx.previewImage({
      current: current,
      urls: this.data.img
    })
  },

  previewReply(e) {
    const url = e.currentTarget.dataset.url
    const urlArr = new Array
    urlArr.push(url)
    wx.previewImage({
      urls: urlArr
    })
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {

  },
  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

})